Properties, General


Mode Current view mode.
Possible values:
  • vmodeText: Text mode
  • vmodeBinary: Binary mode (with fixed line length)
  • vmodeHex: Hex mode
  • vmodeUnicode: Unicode and Unicode/Hex modes
  • vmodeRTF: RTF/UTF-8 mode
  • vmodeMedia: Image/Multimedia mode
  • vmodeWeb: Internet mode
  • vmodeWLX: Plugins mode
Notes:
  • To activate the combined Unicode/Hex mode, user should call the Unicode mode twice.
  • Plugins mode is available only when "WLX" define is uncommented in ATViewerOptions.inc file.
  • UTF-8 encoded texts can be shown only under Windows 2000/XP+. This is due to a limitation of MS RichEdit control.
ModeDetect Enables mode auto-detection on file opening.
File type may be determined by extension or sometimes by contents (extension has higher priority than contents). The global variable ATViewerOptions contains extensions lists for different modes, it's declared as record:
  type
    TATViewerGlobalOptions = record
      ExtText: string; //Text files
      ExtRTF: string; //RTF files
      ExtImages: string; //Image files
      ExtMedia: string; //Video and audio clips
      ExtWeb: string; //Internet documents
    end;
Note:
  • For Plugins mode the different plugin detection scheme is used: matched plugin is determined first by plugin detect-string, or, if plugin detect-string is empty, the first plugin that can load given file is shown. Plugins mode can have higher or lower priority than internal viewers: see PluginsHighPriority property.
ModesDisabledForDetect
ModeUndetected
Mode detection options (used when ModeDetect = True):
  • Set of modes that won't be auto-detected.
  • Default mode that is set when nothing is detected.
FileName
FileSize
FileTime (public, read-only)
Properties of currently open file or folder:
  • Name (WideString)
  • Size (Int64)
  • Time (TFileTime record)
Note:
  • To convert FileTime value to a readable string, you may use, for example, the FormatFileTime function from "Universal Viewer" demo.
IsFocused Enables control focusing on file opening.
Note:
  • Set to True if you use component as main form control (e.g. you have something like Universal Viewer demo). Set to False if you use component as additional optional control (e.g. you have something like Browser demo).
BorderStyle (inherited)
BorderStyleInner
Border styles:
  • Border style of entire TATViewer control.
  • Border style of embedded controls (TATBinHex, TWebBrowser etc).
Note:
  • Set both BorderStyle and BorderStyleInner to bsNone to hide border completely.
PosPercent
PosOffset
PosLine
(public)
Current scroll position:
  • Relative position in percents (%).
    Valid in text, Internet, Plugins modes.
  • Absolute offset (Int64, 0-based).
    Valid in text, Internet modes.
  • Line number (1-based, 0 if line number is not found).
    Valid in text modes only.
Notes for line numbers in ATBinHex control:
  • Lines are separated by: #13#10, #13, #10.
  • Line numbers are counted only for the first ~1Mb of file. And there is also limit for number of lines in that size.
  • Line numbers are counted for the "current" copy of file, they may be incorrect if file was changed (and not reloaded) since the last display.
SearchStarted
SearchFinished
(public, read-only)
Search state flags:
  • Flag that is set after FindFirst method was called once.
  • Flag indicating that FindFirst / FindNext methods returned False on last call.
MarginLeft
MarginTop
MarginRight
MarginBottom
(public)
Printing margins.
Currently in mm.